package com.tmt.paymentcenter.web.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedBy;
import tmt.usercenter.web.domain.BaseDomain;
import tmt.usercenter.web.domain.TmtUser;

import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

@Getter
@Setter
@MappedSuperclass
public class BaseCreator extends BaseDomain implements Serializable {

    /**
     * 记录的创建人
     */
    @ManyToOne(cascade = {CascadeType.REFRESH})
    @JoinColumn(name="creator_id")
    @CreatedBy
    private TradeUser creator;
}